home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / packet / p_aa4re / mbb35src / 8530ini.asm < prev    next >
Encoding:
Assembly Source File  |  1988-09-25  |  2.1 KB  |  43 lines

  1. ;--------------------------------------------------------------------------;
  2. ; Initialize the 8530                                                      ;
  3. ;                                                                          ;
  4. ;   Copyright 1986, 1987 by H. Roy Engehausen.  All rights reserved.       ;
  5. ;   This software may be freely distributed and used, but it may not       ;
  6. ;   under any circumstances be sold by anyone other than the author.       ;
  7. ;   It may be distributed by a commercial company as long as it is         ;
  8. ;   for no cost.                                                           ;
  9. ;                                                                          ;
  10. ;   Permission is explicity granted to use this code as a model for        ;
  11. ;   other programs requiring interrupt driven serial I/O as long as they   ;
  12. ;   carry this copyright notice and the imbedded constants                 ;
  13. ;                                                                          ;
  14. ;--------------------------------------------------------------------------;
  15.  
  16.         CMP     chip[SI],chip_8530  ; Is this an 8530?
  17.         JNE     init_not_8530       ;      Nope:  skip this
  18.  
  19.         MOV     need_tmr,1          ; 8530 requires timer snatch
  20.  
  21.         MOV     DX,baseaddr[SI]     ; Get base address for chip
  22.         MOV     AL,sccreg9          ; Point at WR9
  23.         OUT     DX,AL               ;
  24.         MOV     AL,sccreset         ; Hardware reset the whole chip!
  25.         OUT     DX,AL               ;
  26.  
  27.         MOV     AL,sccreg1          ; Now to WR1
  28.         OUT     DX,AL               ;
  29.         SUB     AL,AL               ; Disable all interrupts!
  30.         OUT     DX,AL               ;
  31.  
  32.         MOV     AL,sccreg15         ; Now to WR15
  33.         OUT     DX,AL               ;
  34.         SUB     AL,AL               ; Disable all interrupts!
  35.         OUT     DX,AL               ;
  36.  
  37.         MOV     AL,sccreg2          ; Now to WR2
  38.         OUT     DX,AL               ;
  39.         SUB     AL,AL               ; Set vector
  40.         OUT     DX,AL               ;
  41.  
  42. init_not_8530:                      ; Not 8530 come here!
  43.